package com.ruoyi.mapper.achievements;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author zeo
 * @explain 绩效打分服务持久层
 * @date 2020/8/24 16:59
 */
public interface AcvScoringManageMapper {

    /**
     * 获取考核人
     *
     * @param map
     * @return
     */
    List<Map<String, Object>> list(Map map);

    /**
     * 验证是否登录
     *
     * @return
     */
    int validationIntroduction(Long examineeId);

    /**
     * 引入考勤数据
     *
     * @return
     */
    int introduce(List<Map<String, Object>> list);

    List<Map<String, Object>> findExamineeBySuperId(Long superId);

    List<String> findTemplateByJobId(String jobId);


    /**
     * 插入汇总表
     *
     * @param years
     * @param months
     * @return
     */
    int insertBill(@Param("years") String years, @Param("months") String months, @Param("superId") Long superId);

    /**
     * 根据年月判断该年月是否已经提交
     */
    int isSubmitByYearsAndMonths(@Param("years") String years, @Param("months") String months, @Param("superId") Long superId);




    Map findScoringByScoringId(@Param("scoringId") String scoringId,@Param("type") String type);

    int updateScoring(@Param("templateIdList") String templateIdList,@Param("scoreList") String scoreList,@Param("remarkList") String remarkList,@Param("scoringId") String scoringId,@Param("totalScore") String totalScore,@Param("remarksTotal") String remarksTotal,@Param("table") String table);

    /**
     * 保存数据
     *
     * @param map
     * @return
     */
    int dataSave(Map map);

    /**
     * 提交数据
     *
     * @return
     */
    int submitData(Long superId);

    /**
     * 删除填写数据
     *
     * @param superId
     * @return
     */
    int deleteData(Long superId);

    int findScoreIsZero(Long superId);

    int emptyData(Long superId);

    int updateTotalScore(@Param("totalScore") String totalScore, @Param("scoringId") String scoringId);

    Map findBillByBillId(String billId);

    int isImport(Long superID);

    List<Map<String,Object>> findNotIntroducedList(Long superId);
}
